/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author FIRE
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface M8ViewCar extends BasicModel<M8ViewCar> {
  code?: string; // 车牌号码
  name?: string; // 车辆名称
}

export const m8ViewCarList = (params?: M8ViewCar | any) =>
  defHttp.get<M8ViewCar>({ url: adminPath + '/bas/car/m8ViewCar/list', params });

export const m8ViewCarListData = (params?: M8ViewCar | any) =>
  defHttp.post<Page<M8ViewCar>>({ url: adminPath + '/bas/car/m8ViewCar/listData', params });

export const m8ViewCarTreeData = (params?: M8ViewCar | any) =>
  defHttp.post<Page<M8ViewCar>>({ url: adminPath + '/bas/car/m8ViewCar/treeData', params });

export const m8ViewCarForm = (params?: M8ViewCar | any) =>
  defHttp.get<M8ViewCar>({ url: adminPath + '/bas/car/m8ViewCar/form', params });

export const m8ViewCarSave = (params?: any, data?: M8ViewCar | any) =>
  defHttp.postJson<M8ViewCar>({ url: adminPath + '/bas/car/m8ViewCar/save', params, data });

export const m8ViewCarDelete = (params?: M8ViewCar | any) =>
  defHttp.get<M8ViewCar>({ url: adminPath + '/bas/car/m8ViewCar/delete', params });
